package ad6;

import java.beans.XMLDecoder;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;

public class XMLToObj {

	public static void main(String[] args) {
		try {
			XMLDecoder xd = new XMLDecoder(new FileInputStream("west.xml"));
			List<Student> list = (List<Student>) xd.readObject();
			xd.close();
			for (Student s : list) {
				System.out.println(s);

			}
		} catch (Exception e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

	}

}
